Skip to main content

Setting up projects from the various React Templates

Installing dependencies

  • Install nodejs from their officical site
  • Make sure you download the version with LTS support
  • ⚠️ At the time of writing this document the latest version of nodejs is 16.16.0
  • The installer includes npm
  • Make sure while installing nodejs, you DO NOT INSTALL CHOCOLATEY
  • Once nodejs is installed, you can close the terminal and open it again.

Checking installed dependencies

  • Open a new Command Prompt and type in node -v and npm -v
  • You should see something like this in your output.
  • Nodejs versions

Installing yarn (Optional)

Once you have installed nodejs and npm, you can install yarn by running this command

npm install --global yarn

Note

⚠️ frontend servers are mostly run in VSCode

⚠️ backend servers are either run in Visual Code (if the template has asp.net core backend) or VSCode

Running the React Templates

Running the frontend server

  1. Clone the repositories from GitHub or Bitbucket as required.
  2. To run the frontend server, you first need to install the node_modules
  3. For doing so, open the cloned repository in VSCode.
cd frontend
npm install

# or

cd frontend
yarn
  1. Once the node_modules are installed, you can start the frontend server using the command npm start or yarn start.
  2. The commands which can be executed are seen in the scripts section of package.json

Running the backend server

  1. If the project has a ASP.NET Core backend, open Visual Studio and install the nuget packages and run the server.
  2. If the project has a FastAPI backend, create a new virtual environment using the mkvirutalenvwrapper, install the packages from requirements.txt using the command
pip install -r requirements.txt

# to run the server
uvicorn main:app --reload